<?php if ($layout->node('type') != 'page') {
include_once('timeformat.php');
$layout->setNode($node); ?>
<div class="node-<?php echo $layout->node('id'); ?>" class="node node-type-<?php echo $layout->node('type'); ?>">
    <!-- blog item -->
		<div class="blogItem">
        <div class="itemTitle clearfix">

            <div class="blog_date"><?php $datehelper = new DateHelper;
                                      echo $datehelper->generateDateField($layout->node('created'));           
                                      echo $datehelper->generateLikeButton(Router::url($this->here, true)); ?> 
            </div><div class="blog_caption"><?php echo $layout->node('title'); ?>
                                          <div><?php echo $datehelper->generateGoogleButton(Router::url($this->here, true));?></div>
                                        </div>
        </div>
    			
    <?php
        echo $layout->nodeBody();
        echo $layout->nodeMoreInfo();
        
?>
                    
</div>

<div id="comments" class="node-comments">
<?php
    $type = $types_for_layout[$layout->node('type')];

    if ($type['Type']['comment_status'] > 0 && $layout->node('comment_status') > 0) {
        echo '<p>'.$this->element('comments').'</p>';
    }

    if ($type['Type']['comment_status'] == 2 && $layout->node('comment_status') == 2) {
        echo '<div id="respond"><p>'.$this->element('comments_form').'</p></div>';
    }
?>
</div></div>

<?php } else { ?>

<?php $this->Layout->setNode($node); ?>
<div class="node-<?php echo $this->Layout->node('id'); ?>" class="node node-type-<?php echo $this->Layout->node('type'); ?>">
    <h2><?php echo $this->Layout->node('title'); ?></h2>
    <?php
        echo $this->Layout->nodeInfo();
        echo $this->Layout->nodeBody();
        echo $this->Layout->nodeMoreInfo();
    ?>
</div>

<div id="comments" class="node-comments">
<?php
    $type = $types_for_layout[$this->Layout->node('type')];

    if ($type['Type']['comment_status'] > 0 && $this->Layout->node('comment_status') > 0) {
        echo $this->element('comments');
    }

    if ($type['Type']['comment_status'] == 2 && $this->Layout->node('comment_status') == 2) {
        echo $this->element('comments_form');
    }
?>
</div>

<?php } ?>
